package com.ruoyi.docdraw.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.docdraw.mapper.SysProjectSupplierMapper;
import com.ruoyi.docdraw.domain.SysProjectSupplier;
import com.ruoyi.docdraw.service.ISysProjectSupplierService;

/**
 * 项目供应商关联Service业务层处理
 * 
 * @author lvtian
 * @date 2025-04-14
 */
@Service
public class SysProjectSupplierServiceImpl implements ISysProjectSupplierService 
{
    @Autowired
    private SysProjectSupplierMapper sysProjectSupplierMapper;

    /**
     * 查询项目供应商关联
     * 
     * @param projectId 项目供应商关联主键
     * @return 项目供应商关联
     */
    @Override
    public SysProjectSupplier selectSysProjectSupplierByProjectId(Long projectId)
    {
        return sysProjectSupplierMapper.selectSysProjectSupplierByProjectId(projectId);
    }

    /**
     * 查询项目供应商关联列表
     * 
     * @param sysProjectSupplier 项目供应商关联
     * @return 项目供应商关联
     */
    @Override
    public List<SysProjectSupplier> selectSysProjectSupplierList(SysProjectSupplier sysProjectSupplier)
    {
        return sysProjectSupplierMapper.selectSysProjectSupplierList(sysProjectSupplier);
    }

    /**
     * 新增项目供应商关联
     * 
     * @param sysProjectSupplier 项目供应商关联
     * @return 结果
     */
    @Override
    public int insertSysProjectSupplier(SysProjectSupplier sysProjectSupplier)
    {
        return sysProjectSupplierMapper.insertSysProjectSupplier(sysProjectSupplier);
    }

    /**
     * 修改项目供应商关联
     * 
     * @param sysProjectSupplier 项目供应商关联
     * @return 结果
     */
    @Override
    public int updateSysProjectSupplier(SysProjectSupplier sysProjectSupplier)
    {
        return sysProjectSupplierMapper.updateSysProjectSupplier(sysProjectSupplier);
    }

    /**
     * 批量删除项目供应商关联
     * 
     * @param projectIds 需要删除的项目供应商关联主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectSupplierByProjectIds(Long[] projectIds)
    {
        return sysProjectSupplierMapper.deleteSysProjectSupplierByProjectIds(projectIds);
    }

    /**
     * 删除项目供应商关联信息
     * 
     * @param projectId 项目供应商关联主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectSupplierByProjectId(Long projectId)
    {
        return sysProjectSupplierMapper.deleteSysProjectSupplierByProjectId(projectId);
    }
}
